#include<stdlib.h>
#include<iostream>
using namespace std;
int getMaxMin(int *arr)
{
	int max=arr[0],min=arr[0];
	double sum=0.0;
	for(int i=0;i<9;i++){
	    if(max<arr[i])
	  {
	  	max=arr[i];
	  } 
	    if(min>arr[i])
	   {
	   	 min=arr[i];
	   }
	sum=sum+arr[i];}
	return (sum-max-min)/7;   
} 
int main()
{
	int a[9]={1,2,3,4,5,6,7,8,9};
	cout<<getMaxMin(a);
	return 0;
}


